﻿using Furion.DatabaseAccessor;
using Microsoft.EntityFrameworkCore;
using ProjectManage.Core.Enum;
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace ProjectManage.Core.Entity.SYS
{
    [Table("sys_user")]
    [Comment("用户表")]
    public class SysUser : IEntity
    {
        /// <summary>
        /// 用户 Id
        /// </summary>
        public Guid Id { get; set; }

        /// <summary>
        /// 账号
        /// </summary>
        [Comment("账号")]
        [Required, MaxLength(50)]
        public string Account { get; set; }

        /// <summary>
        /// 密码
        /// </summary>
        [Comment("密码")]
        [Required, MaxLength(50)]
        public string? Password { get; set; }

        /// <summary>
        /// 头像
        /// </summary>
        [Comment("头像")]
        [MaxLength(200)]
        public string? Avatar { get; set; }

        /// <summary>
        /// 姓名
        /// </summary>
        [Comment("姓名")]
        [Required, MaxLength(50)]
        public string Name { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [Comment("创建时间")]
        public virtual DateTime? CreatedTime { get; set; }

        /// <summary>
        /// 更新时间
        /// </summary>
        [Comment("更新时间")]
        public virtual DateTime? ModifiedTime { get; set; }

        /// <summary>
        /// 创建者名称
        /// </summary>
        [Comment("创建者名称")]
        [MaxLength(50)]
        public virtual string CreatedName { get; set; }


        /// <summary>
        /// 修改者名称
        /// </summary>
        [Comment("修改者名称")]
        [MaxLength(50)]
        public virtual string ModifiedName { get; set; }
    }
}
